package com.easy.service.impl;

import com.easy.bean.Ward;
import com.easy.dao.IWardDao;
import com.easy.service.IWardService;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WardService implements IWardService {
    @Autowired
    IWardDao dao;

    @Override
    public List<Ward> getWard(Ward ward, Page page) {
        return dao.getWard(ward,page);
    }

    @Override
    public int addWard(Ward ward) {
        return dao.addWard(ward);
    }

    @Override
    public int editWard(Ward ward) {
        int count= dao.editWard(ward);
        return count;
    }

    @Override
    public int delWard(int id) {
        return 0;
    }

    @Override
    public Ward getWardById(int id) {
        return dao.getWardById(id);
    }

    @Override
    public int getCount(Ward ward) {
        return dao.getCount(ward);
    }

    @Override
    public List<String> getWardname() {
        return dao.getWardname();
    }
}
